#!/bin/bash
for F in 0 1 2 3 4 5 6 7 8 9; do
 if [ -f /proc/asound/card$F/pcm0c/info ]; then
  NAME=`cat /proc/asound/card$F/pcm0c/info | grep "^name" | awk -F: '{print $2}' | sed 's/HiFi\ .*//g' `
  echo $F: $NAME
 fi
done

